package com.xjgc.msibase.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xjgc.msibase.constant.StatusEnum;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.system.base.entity.JeecgEntity;

/**
 * 调用外部接口记录
 *
 * @author: 小逗号
 * @date: 2023-12-28
 * @description:
 * @since:
 */
@Data
@TableName("msi_exo_server_record")
public class MsiExoServerRecord extends JeecgEntity {


    public MsiExoServerRecord() {
    }

    public MsiExoServerRecord(MsiExoServer exoServer, MsiExoTaskRecord taskRecord) {
        this.exoServerId = exoServer.getId();
        this.exoServerCode = exoServer.getExoServerCode();
        this.exoServerType = exoServer.getExoServerType();
        this.taskRecordId = taskRecord.getId();
        this.taskName = taskRecord.getTaskName();
        this.status = StatusEnum.STATUS_NOT.getCode();
    }

    /**
     * 任务记录id
     */
    private String taskRecordId;
    private String taskName;
    /**
     * 接口id
     */
    private String exoServerId;
    /**
     * 接口名
     */
    private String exoServerCode;
    /**
     * 服务接口类型
     */
    @Dict(dicCode = "msi_server_type")
    private String exoServerType;
    /**
     * 请求数据
     */
    private String dataText;
    /**
     * 状态 成功/失败
     */
    private String status;
    private String message;
    /**
     * 次数 1~3
     */
    private Integer num;


}
